{extend name="public/base"/}
 {block name="content"}
        <section class="content-header">
<h1>
           内容发布
<small>publish content</small>
</h1>
<ol class="breadcrumb">
	<li><a href="{:U('Index/index')}"><i class="fa fa-dashboard"></i>首页</a></li>
	<li class="active"> 内容发布</li>
</ol>
</section>
<style>
	.select2-container--default .select2-selection--single{
		border-radius: 0;
		border: 1px solid #d2d6de;
	}
	.select2-container--default .select2-search--dropdown .select2-search__field{
		border: 1px solid #d2d6de;
	}
	.select2-container--default .select2-selection--single .select2-selection__rendered{
		line-height: 23px;;
	}
	.adt {
		margin:15px 15px 10px 0;
	}
	.highlight{
		margin-bottom: 10px;
	}
</style>
<form action="{:U('Content/addSliderContent')}" method="post">
	<input type="hidden" name="cover_img" id="imgs" value="">
	<input type="hidden" name="status" value="0">
	<input type="hidden" name="rec_ok" value="0">
	<input type="hidden" name="top_ok" value="0">
	<input type="hidden" name="model_id" id="model_id" value="2">
	<input type="hidden" name="term_id" id="term_id" value="1">
	<section class="content">
	<div class="row">
		<div class="col-md-12">
			<div class="" style="margin-top:20px;">
			   <div class="box-body pad" style="padding-bottom:0;">
			   
					<div class="highlight">
				    	<dl>
				    		<dt class="adt">
				    			<em class="required">*</em>选择栏目
				    		</dt>
				    		<dd class="ftype_input">
				    			<div class="fbox">
									<select name="term_id" id="term_id" class="form-control select2">
										<option value="">选择栏目</option>
										{volist name="parent" id="data"}
										<option value="{$data.id}" data-model="{$data.model_id}" {if ($data.hasChild==1)}disabled{/if}>{$data.name}</option>
										{/volist}
									</select>
				    			</div>
				    		</dd>
				    	</dl>
				    </div>
					
					
				    <div class="highlight">
				    	<dl>
				    		<dt class="adt">
				    			<em class="required">*</em>文章标题
				    		</dt>
				    		<dd class="ftype_input">
				    			<div class="fbox">
				    			    <input type="text" name="title" class="form-control">
				    			</div>
				    		</dd>
				    	</dl>
				    </div>
				    <div class="highlight">
				    	<dl>
				    		<dt class="adt">
				    			<em class="required"></em>关键词</dt>
				    		<dd class="ftype_input">
				    			<div class="fbox">
				    			    <input type="text" name="keywords" class="form-control">
				    				
				    			</div>
				    		</dd>
				    	</dl>
				    </div>
				    <div class="highlight">
				    	<dl>
				    		<dt class="adt">
				    			<em class="required"></em>描述
				    		</dt>
				    		<dd class="ftype_input">
				    			<div class="fbox">
<textarea class="form-control" id="des" rows="4" name="description" placeholder="摘要描述" 
style="width: 100%;height:100px;font-size: 14px; line-height: 18px;padding: 10px;" ></textarea>
				    				
				    			</div>
				    		</dd>
				    	</dl>
				    </div>

			   </div>

				<!-- editor -->
			<div class="">
            <textarea id="editor" class="textarea" name="content" placeholder=""
            style="width: 100%;height:300px;font-size: 14px; line-height: 18px;padding: 10px;"></textarea>
                <script> $(function(){ UE.getEditor("editor"); });</script>
			</div>
				<!-- editor end -->
				
				<div class="box-body pad" style="">
				    <div class="highlight" style="padding-bottom:5px;zoom:1;overflow: hidden;">
				       <span style="float: left;">
				       	 <input type="checkbox" class="dese"  value="1" name="intercept" style="float:left;margin-top: 7px;margin-right: 5px;"> <span style="float:left;">是否截取内容</span>
				       </span>
				       <span style="float: left;margin-left: 5px;margin-right: 5px;">
				       	 <input type="text" size="3"  value="150" name="" class="fontsize" style="line-height: 20px;">
				       </span>
						<span style="float: left;">字符至内容摘要</span>
						
				    </div>	
				</div>
                  <!-- 于此相关的class id 等勿动 -->
				<script>
					$(document).ready(function(){
					  $(".dese").click(function(){
					    
								if($('.dese').is(':checked')) {
								var TEST = UE.getEditor('editor').getContentTxt();
								var SIZE = $(".fontsize").val();
								$("#des").val(TEST.substr(0,SIZE));
								}else{
								$("#des").val('');
								}
						
					    });
						
					});
				</script>
				<!-- 勿动 -->
					
					<!-- 推荐 显示 置顶-->
					<div class="box-body pad" style="padding-top:0;padding-bottom:0;">
					  <div class="highlight">
					    	<dl>
					    		<dt class="adt">
					    			<em class="required"></em>发布时间：
					    		</dt>
					    		<dd class="ftype_input">
					    			<div class="fbox">
					    			    <input class="form-control" name="create_time" value="{:date("Y-m-d H:i:s",time())}" placeholder="发表时间">	
					    			</div>
					    		</dd>
					    	</dl>
					    </div>
					<div class="highlight">
					    	<dl>
					    		<dt class="adt">
					    			<em class="required"></em>状态：
					    		</dt>
					    		<dd class="ftype_input">
					    			<div class="fbox" style=" padding-left: 8px;">
					    			    <label class="flabel">
					    			    <input type="checkbox" name="status" checked="checked"  value="1" style="width:10px;float:left;">
					    			    <span style="float:left;margin-left:8px;">前台显示</span>					    			    	
					    			    </label>
					    			    <label class="flabel">
					    			    <input type="checkbox" name="rec_ok"  value="1" style="width:10px;float:left;">
					    			    <span style="float:left;margin-left:8px;">推荐</span>					    			    	
					    			    </label>
					    			    <label class="flabel">
					    			    <input type="checkbox" name="top_ok"  value="1" style="width:10px;float:left;">
					    			    <span style="float:left;margin-left:8px;">置顶</span>					    			    	
					    			    </label>
					    				
					    			</div>
					    		</dd>
					    	</dl>
					    </div>
					    <div class="highlight">
					    	<dl>
					    		<dt class="adt">
					    			<em class="required"></em>封面图片:
					    		</dt>
					    		<dd class="ftype_input">
					    			<div class="fbox">
					    			    <div id="uploader" class="wu-example" name="cover_img">
				                            <!--用来存放文件信息-->
				                            <div id="thelist2" class="uploader-list"></div>
				                            <div class="btns">
				                                <div class="picker" id="picker2">图片上传</div>
				                            </div>
				                        </div>
					    				
					    			</div>
					    		</dd>
					    	</dl>
					    </div>
									
					<!-- SEO -->
					<!--<div class="box-header with-border" style="margin:0 18px;padding-left:0;">-->
						<!--<h3 class="box-title" >SEO设置:</h3>-->
					<!--</div>-->
						<!--<div class="highlight">-->
				    	<!--<dl>-->
				    		<!--<dt class="adt">-->
				    			<!--<em class="required"></em>标题:</dt>-->
				    		<!--<dd class="ftype_input">-->
				    			<!--<div class="fbox">-->
				    			   <!--<input class="form-control" name="seo_title" placeholder="META Title（标题）">-->
				    				<!---->
				    			<!--</div>-->
				    		<!--</dd>-->
				    	<!--</dl>-->
				    <!--</div>-->
					<!---->
					<!--<div class="highlight">-->
				    	<!--<dl>-->
				    		<!--<dt class="adt">-->
				    			<!--<em class="required"></em>关键词:</dt>-->
				    		<!--<dd class="ftype_input">-->
				    			<!--<div class="fbox">-->
				    			  <!--<input class="form-control" name="seo_keywords" placeholder="META Keywords（关键词）">-->
				    			<!--</div>-->
				    		<!--</dd>-->
				    	<!--</dl>-->
				    <!--</div>-->
							<!---->
							<!--<div class="highlight">-->
				    	<!--<dl>-->
				    		<!--<dt class="adt">-->
				    			<!--<em class="required"></em>摘要:</dt>-->
				    		<!--<dd class="ftype_input">-->
				    			<!--<div class="fbox">-->
				    	<!--<textarea class="form-control" rows="14" name="seo_description" style="width:100%;height:130px;" placeholder="摘要描述"></textarea>-->
				    			<!--</div>-->
				    		<!--</dd>-->
				    	<!--</dl>-->
				    <!--</div>-->
					<!-- SEO END-->
						

						
	<div style="padding:10px 0px;"><input type="submit" class="btn btn-block btn-primary" style="width:100px; border:none;" value="提交"/></div>
	<div style="clear:both">
	</div>
                        

			</div>
		</div>
		
	</div>

	</section>
	<!-- 姑且如此 -->
	
	<div style="clear:both">
	</div>
</form>
<!-- test -->


		 <script>
      $(function () {
        $(".select2").select2();
        $("[data-mask]").inputmask();
        $('#reservation').daterangepicker();
        $('#reservationtime').daterangepicker({timePicker: true, timePickerIncrement: 30, format: 'MM/DD/YYYY h:mm A'});
        $('#daterange-btn').daterangepicker(
            {
              ranges: {
                'Today': [moment(), moment()],
                'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
                'Last 7 Days': [moment().subtract(6, 'days'), moment()],
                'Last 30 Days': [moment().subtract(29, 'days'), moment()],
                'This Month': [moment().startOf('month'), moment().endOf('month')],
                'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
              },
              startDate: moment().subtract(29, 'days'),
              endDate: moment()
            },
        function (start, end) {
          $('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
        }
        );
        $('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck({
          checkboxClass: 'icheckbox_minimal-blue',
          radioClass: 'iradio_minimal-blue'
        });
        $('input[type="checkbox"].minimal-red, input[type="radio"].minimal-red').iCheck({
          checkboxClass: 'icheckbox_minimal-red',
          radioClass: 'iradio_minimal-red'
        });
        $('input[type="checkbox"].flat-red, input[type="radio"].flat-red').iCheck({
          checkboxClass: 'icheckbox_flat-green',
          radioClass: 'iradio_flat-green'
        });
        $(".my-colorpicker1").colorpicker();
        $(".my-colorpicker2").colorpicker();
        $(".timepicker").timepicker({
          showInputs: false
        });
      });
    </script>
	<!-- test end -->
	
 {/block}
